/**
 * Test the functionality of the Key class.
 * 
 * GNU General Public License v3, February 2011.
 * 
 * @author Adam Steinberger
 * 
 * This file is part of jSynthesizer.
 * 
 * jSynthesizer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * jSynthesizer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with jSynthesizer.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Please direct all inquiries about jSynthesizer to the author:
 * Adam Steinberger, asteinberger@frontier.com, http://www.amsteinberger.com/
 */

public class KeyTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Key key = new Key("C", "major", 200.0, 1.0);
		Chord tonic = key.note(1,3);
		Chord supertonic = key.note(2,3);
		Chord mediant = key.note(3,3);
		Chord subdominant = key.note(4,3);
		Chord dominant = key.note(5,3);
		Chord submediant = key.note(6,3);
		Chord leadingTone = key.note(7,3);
		Chord octave = key.note(1,4);
		tonic.playNotes();
		supertonic.playNotes();
		mediant.playNotes();
		subdominant.playNotes();
		dominant.playNotes();
		submediant.playNotes();
		leadingTone.playNotes();
		octave.playNotes();
		key.scaleUp(3);
		key = new Key("F#", "melodic minor", 200.0, 0.75);
		key.scaleDown(3);
		Chord chord1 = key.triad(1,3);
		Chord chord4 = key.triad(4,3);
		Chord chord5 = key.triad(5,3);
		chord1.playNotes();
		chord4.playNotes();
		chord1.playNotes();
		chord5.playNotes();
		chord1.playNotes();
	}

}
